<html>
<head><meta charset="utf-8"><title>Adding mips target · project-inline-asm · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/index.html">project-inline-asm</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html">Adding mips target</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="210279196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210279196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210279196">(Sep 16 2020 at 15:31)</a>:</h4>
<p>I have a few question about adding tests for asm! of new target.<br>
Why all rust files in <code>src/test/assembly/asm/</code> has to be no_core ?</p>



<a name="210279857"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210279857" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210279857">(Sep 16 2020 at 15:35)</a>:</h4>
<p>Because otherwise they wouldn't be tested by CI.</p>



<a name="210279875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210279875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210279875">(Sep 16 2020 at 15:35)</a>:</h4>
<p>Since we don't run tests for all platforms.</p>



<a name="210350104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210350104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210350104">(Sep 17 2020 at 05:40)</a>:</h4>
<p>cool. What about <code>def_regs!</code> ? Is it only used to validate register names passed to <code>in($reg)</code>, <code>lateout($reg)</code> ?</p>



<a name="210350227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210350227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210350227">(Sep 17 2020 at 05:43)</a>:</h4>
<p>Yes. Also to associate register names with the register class they belong to.</p>



<a name="210350981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210350981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210350981">(Sep 17 2020 at 06:01)</a>:</h4>
<p>looks like llvm_asm! supports both <code>reg</code> and <code>$reg</code> for mips, for example: <code>v0</code> and <code>$v0</code>.<br>
Do we want to keep this behaviour ? Also what about escaping the <code>$</code> in template string ?</p>



<a name="210351000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210351000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210351000">(Sep 17 2020 at 06:01)</a>:</h4>
<p>I guess LLVM handle the escaping.</p>



<a name="210351151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210351151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210351151">(Sep 17 2020 at 06:04)</a>:</h4>
<p>do we need to forbid <code>$at</code>, <code>$gp</code> ?</p>



<a name="210374498"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210374498" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210374498">(Sep 17 2020 at 11:06)</a>:</h4>
<p>Is the state of llvm_asm for mips alright ? I got a compiler crash when digging: <a href="https://github.com/rust-lang/rust/issues/76834">https://github.com/rust-lang/rust/issues/76834</a></p>



<a name="210379894"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210379894" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210379894">(Sep 17 2020 at 12:13)</a>:</h4>
<p><span class="user-mention" data-user-id="209117">@lzutao</span> You need to escape <code>$</code> as <code>$$</code>.</p>



<a name="210380483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210380483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210380483">(Sep 17 2020 at 12:19)</a>:</h4>
<p><span class="user-mention" data-user-id="209117">@lzutao</span> Oh that's because <code>extern_func</code> is a ZST.</p>



<a name="210380635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210380635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210380635">(Sep 17 2020 at 12:21)</a>:</h4>
<p>As a general rule stay away from memory constraints, they are super buggy.</p>



<a name="210380652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210380652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210380652">(Sep 17 2020 at 12:21)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="n">llvm_asm</span><span class="o">!</span><span class="p">(</span><span class="s">&quot;la $$v0, ($0)&quot;</span><span class="w"> </span>: <span class="s">&quot;={$0}&quot;</span><span class="p">(</span><span class="n">a</span><span class="p">)</span><span class="w"> </span>: <span class="s">&quot;*m&quot;</span><span class="p">(</span><span class="o">&amp;</span><span class="mi">0</span><span class="k">usize</span><span class="p">));</span><span class="w"></span>
</code></pre></div>



<a name="210380684"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210380684" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210380684">(Sep 17 2020 at 12:21)</a>:</h4>
<p>This seems to work.</p>



<a name="210382267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210382267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210382267">(Sep 17 2020 at 12:36)</a>:</h4>
<p>thanks, I'll take a look.<br>
The reason I opened <a href="https://github.com/rust-lang/rust/issues/76834">#76834</a> is that I got the same segfault when adding similar asm! tests for mips</p>



<a name="210382330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210382330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210382330">(Sep 17 2020 at 12:37)</a>:</h4>
<p>Are you basing it off the existing tests in src/test/assembly/asm?</p>



<a name="210382388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210382388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210382388">(Sep 17 2020 at 12:37)</a>:</h4>
<p>yes, i am</p>



<a name="210382549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210382549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210382549">(Sep 17 2020 at 12:38)</a>:</h4>
<p><span class="user-mention silent" data-user-id="209117">lzutao</span> <a href="#narrow/stream/216763-project-inline-asm/topic/Adding.20mips.20target/near/210351151">said</a>:</p>
<blockquote>
<p>do we need to forbid <code>$at</code>, <code>$gp</code> ?</p>
</blockquote>
<p>Check in MIPSISelLowering.cpp for the list of reserved registers in the LLVM source code.</p>



<a name="210384106"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210384106" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210384106">(Sep 17 2020 at 12:52)</a>:</h4>
<p>if we don't handle reserved registers, will it be errored out by llvm ?</p>



<a name="210384147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210384147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210384147">(Sep 17 2020 at 12:52)</a>:</h4>
<p>No, it will just generated invalid code.</p>



<a name="210388168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210388168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210388168">(Sep 17 2020 at 13:21)</a>:</h4>
<p>at least llvm issues a warning when using $at: <a href="https://rust.godbolt.org/z/sEYjfe">https://rust.godbolt.org/z/sEYjfe</a></p>



<a name="210388563"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210388563" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210388563">(Sep 17 2020 at 13:24)</a>:</h4>
<p>how is $zero reserved in llvm ? <a href="https://github.com/llvm/llvm-project/blob/63d3aeb529a7b0fb95c2092ca38ad21c1f5cfd74/llvm/lib/Target/Mips/MipsRegisterInfo.cpp#L151-L152">https://github.com/llvm/llvm-project/blob/63d3aeb529a7b0fb95c2092ca38ad21c1f5cfd74/llvm/lib/Target/Mips/MipsRegisterInfo.cpp#L151-L152</a></p>



<a name="210388599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210388599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210388599">(Sep 17 2020 at 13:24)</a>:</h4>
<p>I thought we could use it.</p>



<a name="210388700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210388700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210388700">(Sep 17 2020 at 13:25)</a>:</h4>
<p><code>$zero</code> isn't a real register. You can't write a value to it, it always contains 0.</p>



<a name="210389041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210389041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210389041">(Sep 17 2020 at 13:27)</a>:</h4>
<p>the documentation I downloaded from <a href="http://mips.com">mips.com</a> said this:</p>
<blockquote>
<p>Zero is a constant zero which can be read or written but will always be read as a<br>
zero. This is not really a convention because you really cannot use it for any thing<br>
else.</p>
</blockquote>



<a name="210389129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210389129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210389129">(Sep 17 2020 at 13:28)</a>:</h4>
<p>so we could write to it but the written value is discard.</p>



<a name="210389163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210389163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210389163">(Sep 17 2020 at 13:28)</a>:</h4>
<p>Yes. This means that it is useless for passing arguments in/out of <code>asm!</code></p>



<a name="210389214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210389214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210389214">(Sep 17 2020 at 13:29)</a>:</h4>
<p>It's the same as XZR on AArch64</p>



<a name="210389256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210389256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210389256">(Sep 17 2020 at 13:29)</a>:</h4>
<p>Ah, I got it. Was thinking about $zero in template string.</p>



<a name="210390257"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210390257" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210390257">(Sep 17 2020 at 13:36)</a>:</h4>
<p>about $k0, $k1 which are os temps regs, we can only use they in naked asm ? Not in asm!.</p>



<a name="210390362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210390362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210390362">(Sep 17 2020 at 13:36)</a>:</h4>
<p>You can use them inside the asm, just not for in/out arguments</p>



<a name="210391153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210391153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210391153">(Sep 17 2020 at 13:42)</a>:</h4>
<p>do we need to care about Google Native Client (NaCl) sandbox target ? LLVM has special case for it.</p>



<a name="210391207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210391207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210391207">(Sep 17 2020 at 13:42)</a>:</h4>
<p>You can ignore it until we have such a target in rustc.</p>



<a name="210392608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210392608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210392608">(Sep 17 2020 at 13:53)</a>:</h4>
<p>how can I check for ABICalls: <a href="https://github.com/llvm/llvm-project/blob/deb8f8bcf31540c657716ea5242183b0792702a1/llvm/lib/Target/Mips/MipsRegisterInfo.cpp#L176">https://github.com/llvm/llvm-project/blob/deb8f8bcf31540c657716ea5242183b0792702a1/llvm/lib/Target/Mips/MipsRegisterInfo.cpp#L176</a> ?</p>



<a name="210392683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210392683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210392683">(Sep 17 2020 at 13:53)</a>:</h4>
<p>Check for the relevant LLVM target feature.</p>



<a name="210393343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210393343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210393343">(Sep 17 2020 at 13:58)</a>:</h4>
<p>I don't know where to check that, but I found this: <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_target/spec/struct.TargetOptions.html#structfield.position_independent_executables">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_target/spec/struct.TargetOptions.html#structfield.position_independent_executables</a> <br>
Should it be replaceable because there is a comment for abicalls ?</p>
<div class="codehilite"><pre><span></span><code>   <span class="c1">// NoABICalls - Disable SVR4-style position-independent code.</span>
   <span class="kt">bool</span> <span class="n">NoABICalls</span><span class="p">;</span>
</code></pre></div>



<a name="210406362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210406362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210406362">(Sep 17 2020 at 15:27)</a>:</h4>
<div class="codehilite"><pre><span></span><code>lib/Target/Mips/Mips.td
60:def FeatureNoABICalls  : SubtargetFeature&lt;&quot;noabicalls&quot;, &quot;NoABICalls&quot;, &quot;true&quot;,
</code></pre></div>



<a name="210406440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210406440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210406440">(Sep 17 2020 at 15:28)</a>:</h4>
<p>So you can check for the <code>noabicalls</code> feature</p>



<a name="210406645"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210406645" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210406645">(Sep 17 2020 at 15:30)</a>:</h4>
<p>so I'm defining the registers in <code>rustc_target::asm::mips</code>, do I need to use llvm there ?</p>



<a name="210406773"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210406773" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210406773">(Sep 17 2020 at 15:30)</a>:</h4>
<p>anyway, it seems that rustc doesn't support abicalls, I skipped the check.</p>



<a name="210407060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210407060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210407060">(Sep 17 2020 at 15:33)</a>:</h4>
<p>really a draft PR, but it would be nice if you could have a look: <a href="https://github.com/rust-lang/rust/pull/76839">https://github.com/rust-lang/rust/pull/76839</a></p>



<a name="210434516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210434516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210434516">(Sep 17 2020 at 18:58)</a>:</h4>
<p><span class="user-mention silent" data-user-id="143274">Amanieu</span> <a href="#narrow/stream/216763-project-inline-asm/topic/Adding.20mips.20target/near/210391207">said</a>:</p>
<blockquote>
<p>You can ignore it until we have such a target in rustc.</p>
</blockquote>
<p>Also, Google has been deprioritizing it heavily, and I think we should hesitate before putting any effort there.</p>



<a name="210530236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210530236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210530236">(Sep 18 2020 at 14:54)</a>:</h4>
<p>does the assembler reorder functions in .s output file ?</p>



<a name="210530346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210530346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210530346">(Sep 18 2020 at 14:55)</a>:</h4>
<p>I had to manually reorder function definitions to pass FileCheck.</p>



<a name="210530361"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210530361" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210530361">(Sep 18 2020 at 14:55)</a>:</h4>
<p>I've noticed that it sometimes does that. I have no idea why.</p>



<a name="210530406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210530406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210530406">(Sep 18 2020 at 14:55)</a>:</h4>
<p>Just reorder them then and don't worry about it.</p>



<a name="210535183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210535183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210535183">(Sep 18 2020 at 15:25)</a>:</h4>
<p>Is it a good idea to include a subchapter under asm feature of unstable book for mips and supported archs ?<br>
It could include some information like the valid form of registers in operands<code>$ra</code> vs <code>ra</code>,<br>
links to recommended docs of architectures.</p>



<a name="210535317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210535317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210535317">(Sep 18 2020 at 15:26)</a>:</h4>
<p>I don't think a subchapter is necessary. Just add the MIPS register names to the existing tables.</p>



<a name="210535358"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210535358" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210535358">(Sep 18 2020 at 15:26)</a>:</h4>
<p>Though a section providing various links to ASM resources could be useful.</p>



<a name="210535387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210535387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210535387">(Sep 18 2020 at 15:27)</a>:</h4>
<p>(not MIPS-specific, but for all architectures)</p>



<a name="210536117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210536117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210536117">(Sep 18 2020 at 15:31)</a>:</h4>
<p>the page will be long. Those docs are arch-dependant. People doesn't always read about arch they don't program for.<br>
So I think include a subchapter will be good. Through subchapters will be very short.</p>



<a name="210536337"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210536337" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210536337">(Sep 18 2020 at 15:33)</a>:</h4>
<p>I was thinking something like:</p>
<div class="codehilite"><pre><span></span><code>Further reading
===

X86:
- https://foo
- https://bad
ARM:
- ...
MIPS:
- ...
</code></pre></div>



<a name="210536396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210536396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210536396">(Sep 18 2020 at 15:33)</a>:</h4>
<p>Or do you want more than just links?</p>



<a name="210536530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210536530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210536530">(Sep 18 2020 at 15:34)</a>:</h4>
<p>btw, <span class="user-mention" data-user-id="116122">@simulacrum</span> do you know which CI builder to use for developing with rustc LLVM ?<br>
dist-x86_64-linux didn't run asm tests , neither do x86_64-gnu-llvm-8 .</p>



<a name="210536577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210536577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210536577">(Sep 18 2020 at 15:34)</a>:</h4>
<p>dist only generates packages, it doesn't run tests.</p>



<a name="210536645"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210536645" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210536645">(Sep 18 2020 at 15:35)</a>:</h4>
<p>You want x86_64-gnu</p>



<a name="210536845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210536845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210536845">(Sep 18 2020 at 15:36)</a>:</h4>
<p>will try it<br>
<span class="user-mention silent" data-user-id="143274">Amanieu</span> <a href="#narrow/stream/216763-project-inline-asm/topic/Adding.20mips.20target/near/210536396">said</a>:</p>
<blockquote>
<p>Or do you want more than just links?</p>
</blockquote>
<p>Yeah, maybe some explanations about accepted operands, minimum LLVM for distro ?</p>



<a name="210536915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210536915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210536915">(Sep 18 2020 at 15:37)</a>:</h4>
<p>oh wait, distro doesn't build nightly, so ignore it.</p>



<a name="210536938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210536938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210536938">(Sep 18 2020 at 15:37)</a>:</h4>
<p>I'm hesitant to make any guarantees for LLVM versions other than the one officially shipped with rust.</p>



<a name="210537027"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210537027" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210537027">(Sep 18 2020 at 15:38)</a>:</h4>
<p>Of course we'll have to commit to something if we ever stabilize it.</p>



<a name="210616739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210616739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> est31 <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210616739">(Sep 19 2020 at 14:04)</a>:</h4>
<p><span class="user-mention silent" data-user-id="143274">Amanieu</span> <a href="#narrow/stream/216763-project-inline-asm/topic/Adding.20mips.20target/near/210391207">said</a>:</p>
<blockquote>
<p>You can ignore it until we have such a target in rustc.</p>
</blockquote>
<p>It's been removed since a long time ago: <a href="https://github.com/rust-lang/rust/issues/42420">https://github.com/rust-lang/rust/issues/42420</a></p>



<a name="210733397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210733397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210733397">(Sep 21 2020 at 12:27)</a>:</h4>
<p>Hi, I managed to build LLVM with release-debuginfo and assertions on.<br>
Still I don't know how to track down the crash in LLVM, would love to have a guide.<br>
<a href="https://github.com/rust-lang/rust/pull/76839#issuecomment-696055912">https://github.com/rust-lang/rust/pull/76839#issuecomment-696055912</a></p>



<a name="210737004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210737004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210737004">(Sep 21 2020 at 13:00)</a>:</h4>
<p><span class="user-mention" data-user-id="209117">@lzutao</span> Can you isolate it down to a single test case and then dump the LLVM IR?</p>



<a name="210738780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210738780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210738780">(Sep 21 2020 at 13:15)</a>:</h4>
<p><span class="user-mention" data-user-id="209117">@lzutao</span> I ran a few quick tests in godbolt, it seems that LLVM only supports <code>i32</code>, not <code>i16</code>/<code>i8</code> for inline asm.</p>



<a name="210739224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210739224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210739224">(Sep 21 2020 at 13:18)</a>:</h4>
<p>If you want to support them then you'll need to add a fixup in <code>compiler/rustc_codegen_llvm/src/asm.rs</code></p>



<a name="210739277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210739277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210739277">(Sep 21 2020 at 13:18)</a>:</h4>
<p>to basically convert to/from <code>i32</code> before passing the value to LLVM.</p>



<a name="210859987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210859987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210859987">(Sep 22 2020 at 12:05)</a>:</h4>
<p>do we ever test llvm-ir for asm! or just test the generated code ?</p>



<a name="210866825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/210866825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#210866825">(Sep 22 2020 at 13:06)</a>:</h4>
<p>Just the generated code</p>



<a name="211623408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/211623408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#211623408">(Sep 29 2020 at 13:52)</a>:</h4>
<p>Do you know some recommended documentation for mips64 ?<br>
I'm having trouble find reliable ones.<br>
For example,  although I though registers just changing size and theirs number is not.<br>
Via godbolt,<code>$t0</code> in misp32 is <code>$8</code>, it is <code>$12</code> in mips64.</p>



<a name="211627109"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/211627109" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#211627109">(Sep 29 2020 at 14:18)</a>:</h4>
<p>Maybe that's llvm replace $t0 with $t4, kinda surprised.</p>



<a name="211629166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/211629166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#211629166">(Sep 29 2020 at 14:32)</a>:</h4>
<p>I know nothing about mips other than what I can Google in the spot.</p>



<a name="211629204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/211629204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#211629204">(Sep 29 2020 at 14:33)</a>:</h4>
<p>You could try reaching the LLVM backend.</p>



<a name="211753859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Adding%20mips%20target/near/211753859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Adding.20mips.20target.html#211753859">(Sep 30 2020 at 12:49)</a>:</h4>
<p>I think there are many unreached spots in asm! for tier3 targets.<br>
I expect even asm! is stabilized, support for mips or risc-v will remain on nightly.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>